package com.lktx.sso.system.task;

import cn.hserver.core.ioc.annotation.Bean;
import cn.hserver.core.ioc.annotation.Task;
import lombok.extern.slf4j.Slf4j;

import java.time.LocalTime;

/**
 * 定时任务Demo
 */
@Slf4j
@Bean
public class DemoTask {

    @Task(name = "test",time = "100010")
    public void run() {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            log.error("err", e);
        }
        log.info("Test：" + LocalTime.now());
    }
}
